package com.itheima.vo;

import com.itheima.domain.db.UserInfo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserInfoAdminVo implements Serializable {
    private Long id; //用户id
    private String nickname; //昵称
    private String avatar; //用户头像
    private String birthday; //生日
    private String gender; //性别
    private String age; //年龄
    private String city; //城市
    private String income; //收入
    private String education; //学历
    private String profession; //行业
    private String coverPic; // 封面图片
    private Integer marriage; //婚姻状态
    private String userStatus; //冻结状态
    private Date created;//注册时间

    public UserInfoAdminVo(UserInfo userInfo) {
        this.id = userInfo.getId();
        this.nickname = userInfo.getNickname();
        this.avatar = userInfo.getAvatar();
        this.birthday = userInfo.getBirthday();
        this.gender = userInfo.getGender();
        this.age = userInfo.getAge().toString();
        this.city = userInfo.getCity();
        this.income = userInfo.getIncome();
        this.education = userInfo.getEducation();
        this.profession = userInfo.getProfession();
        this.coverPic = userInfo.getCoverPic();
        this.marriage = userInfo.getMarriage();
        this.userStatus=userInfo.getUserStatus().toString();
        this.created=userInfo.getCreated();
    }
}
